{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}

<div class="alerts-popup-wrap table-body-wrap">
  {{#if view.isLoaded}}
    <table class="table table-hover">
      <thead>
        <tr>
          <th class="col-sm-4">{{t alerts.definition.details.serviceHost}}</th>
          <th class="col-sm-4">{{t alerts.fastAccess.popup.body.name}}</th>
          <th class="col-sm-4">{{t common.status}}</th>
        </tr>
      </thead>
    </table>
    <div id="alert-info">
      {{#if view.isAlertEmptyList}}
        <div class="alert-list-wrap">{{t alerts.fastAccess.popup.body.noalerts}}</div>
      {{else}}
        <table class="table table-hover">
          <tbody>
            {{#each instance in view.pageContent}}
              <tr>
                <td class="col-sm-4">
                  {{view App.AlertInstanceServiceHostView instanceBinding="instance"}}
                </td>
                <td class="col-sm-4">
                  <a href="#" {{action "gotoAlertDetails" instance target="view"}}>{{instance.label}}</a>
                  <div class="instance-text">
                    {{instance.text}}
                  </div>task-detail-log-info
                </td>
                <td class="col-sm-4" {{bindAttr title="instance.lastTriggered"}}>
                  {{view App.AlertInstanceStateView instanceBinding="instance"}}
                </td>
              </tr>
            {{/each}}
          </tbody>
        </table>
      {{/if}}
    </div>
    {{#if view.isPaginate}}
      <table class="table table-hover">
        <tfoot>
          <tr>
            <td colspan="3">
              {{view App.PaginationView}}
            </td>
          </tr>
        </tfoot>
      </table>
    {{/if}}

    <div {{bindAttr class="view.filteringComplete:hidden :table-overlay"}}>
      {{view App.SpinnerView}}
    </div>

  {{else}}
    {{view App.SpinnerView}}
  {{/if}}
</div>

